package com.acoreful.acf2java.admin.modules.auth.support;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;

@Data
public class CurrentStaff {
    
    private String id; // 唯一标识

    private String username; // 登录名
    
    private String cname; // 中文名
    
    private String mobile; // 手机号
    
    private Date loginAt; // 最后一次登录时间
    
    private List<String> roles = new ArrayList<>(0);
    
    private List<String> permissions = new ArrayList<>(0);
    
    public boolean hasRole(String role) {
        return roles.contains(role);
    }
    public boolean hasPermission(String permission) {
        return permissions.contains(permission);
    }
    
}
